import Vue from 'vue'
import Vuex from 'vuex'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'

import App from './App.vue'
import routers from './router.js'
import State from './states'


Vue.use(VueRouter)
Vue.use(VueResource)
Vue.use(ElementUI)
Vue.use(Vuex)


const store = new Vuex.Store(State.states)
const router = new VueRouter(routers)

new Vue({
  router,
   // 把 store 对象提供给 “store” 选项，这可以把 store 的实例注入所有的子组件
   store,
  el: '#app',
  render: h => h(App)
})
